home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / grizzly-adventure.swf / scripts / component / quitandsave.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  5.4 KB  |  172 lines

  1. package component
  2. {
  3.    import flash.accessibility.*;
  4.    import flash.debugger.*;
  5.    import flash.display.*;
  6.    import flash.errors.*;
  7.    import flash.events.*;
  8.    import flash.external.*;
  9.    import flash.filters.*;
  10.    import flash.geom.*;
  11.    import flash.media.*;
  12.    import flash.net.*;
  13.    import flash.printing.*;
  14.    import flash.profiler.*;
  15.    import flash.system.*;
  16.    import flash.text.*;
  17.    import flash.ui.*;
  18.    import flash.utils.*;
  19.    import flash.xml.*;
  20.    import mx.binding.*;
  21.    import mx.containers.Canvas;
  22.    import mx.controls.Button;
  23.    import mx.controls.TextArea;
  24.    import mx.core.UIComponentDescriptor;
  25.    import mx.core.mx_internal;
  26.    import mx.events.PropertyChangeEvent;
  27.    import mx.styles.*;
  28.    
  29.    public class quitandsave extends Canvas
  30.    {
  31.        
  32.       
  33.       private var _1279186702dontsavebtn:Button;
  34.       
  35.       private var _documentDescriptor_:UIComponentDescriptor;
  36.       
  37.       private var _347210731backbtn:Button;
  38.       
  39.       private var _1872818111savebtn:Button;
  40.       
  41.       public function quitandsave()
  42.       {
  43.          _documentDescriptor_ = new UIComponentDescriptor({
  44.             "type":Canvas,
  45.             "propertiesFactory":function():Object
  46.             {
  47.                return {
  48.                   "width":624,
  49.                   "height":48,
  50.                   "childDescriptors":[new UIComponentDescriptor({
  51.                      "type":Button,
  52.                      "id":"dontsavebtn",
  53.                      "propertiesFactory":function():Object
  54.                      {
  55.                         return {
  56.                            "x":213,
  57.                            "y":7,
  58.                            "label":"Don\'t save",
  59.                            "width":97,
  60.                            "height":33
  61.                         };
  62.                      }
  63.                   }),new UIComponentDescriptor({
  64.                      "type":Button,
  65.                      "id":"backbtn",
  66.                      "propertiesFactory":function():Object
  67.                      {
  68.                         return {
  69.                            "x":375,
  70.                            "y":7,
  71.                            "label":"Back",
  72.                            "height":33,
  73.                            "width":70
  74.                         };
  75.                      }
  76.                   }),new UIComponentDescriptor({
  77.                      "type":TextArea,
  78.                      "stylesFactory":function():void
  79.                      {
  80.                         this.backgroundAlpha = 0;
  81.                         this.borderStyle = "none";
  82.                      },
  83.                      "propertiesFactory":function():Object
  84.                      {
  85.                         return {
  86.                            "x":10,
  87.                            "y":7,
  88.                            "editable":false,
  89.                            "text":"Your level update will be lost if ou don\'t save !",
  90.                            "height":34
  91.                         };
  92.                      }
  93.                   }),new UIComponentDescriptor({
  94.                      "type":Button,
  95.                      "id":"savebtn",
  96.                      "propertiesFactory":function():Object
  97.                      {
  98.                         return {
  99.                            "x":497,
  100.                            "y":7,
  101.                            "label":"Save",
  102.                            "height":33,
  103.                            "width":70
  104.                         };
  105.                      }
  106.                   })]
  107.                };
  108.             }
  109.          });
  110.          super();
  111.          mx_internal::_document = this;
  112.          this.width = 624;
  113.          this.height = 48;
  114.          this.styleName = "MenuCanvas";
  115.       }
  116.       
  117.       public function set backbtn(param1:Button) : void
  118.       {
  119.          var _loc2_:Object = this._347210731backbtn;
  120.          if(_loc2_ !== param1)
  121.          {
  122.             this._347210731backbtn = param1;
  123.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"backbtn",_loc2_,param1));
  124.          }
  125.       }
  126.       
  127.       [Bindable(event="propertyChange")]
  128.       public function get dontsavebtn() : Button
  129.       {
  130.          return this._1279186702dontsavebtn;
  131.       }
  132.       
  133.       override public function initialize() : void
  134.       {
  135.          mx_internal::setDocumentDescriptor(_documentDescriptor_);
  136.          super.initialize();
  137.       }
  138.       
  139.       [Bindable(event="propertyChange")]
  140.       public function get backbtn() : Button
  141.       {
  142.          return this._347210731backbtn;
  143.       }
  144.       
  145.       public function set dontsavebtn(param1:Button) : void
  146.       {
  147.          var _loc2_:Object = this._1279186702dontsavebtn;
  148.          if(_loc2_ !== param1)
  149.          {
  150.             this._1279186702dontsavebtn = param1;
  151.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"dontsavebtn",_loc2_,param1));
  152.          }
  153.       }
  154.       
  155.       public function set savebtn(param1:Button) : void
  156.       {
  157.          var _loc2_:Object = this._1872818111savebtn;
  158.          if(_loc2_ !== param1)
  159.          {
  160.             this._1872818111savebtn = param1;
  161.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"savebtn",_loc2_,param1));
  162.          }
  163.       }
  164.       
  165.       [Bindable(event="propertyChange")]
  166.       public function get savebtn() : Button
  167.       {
  168.          return this._1872818111savebtn;
  169.       }
  170.    }
  171. }
  172.